//
//  RightGoodsCollectionViewCell.m
//  JiuJiuShangCheng
//
//  Created by jiujiukeji on 2018/9/25.
//  Copyright © 2018年 jiujiukeji. All rights reserved.
//

#import "RightGoodsCollectionViewCell.h"

@implementation RightGoodsCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpUI];
    }
    return self;
}
- (void)setUpUI
{
    self.iconImg = [[UIImageView alloc] init];
    //    [_iconImg sizeToFit];
//    _iconImg.image = UIImageNamed(@"picaoimg");
    _iconImg.contentMode = UIViewContentModeScaleAspectFit;
    [self addSubview:_iconImg];
    [_iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self);
        make.size.mas_offset(CGSizeMake(rateHeight(200), rateHeight(200)));
    }];
    self.textLB = [UILabel labelWithText:@"" textColor:UIColorFromRGB(0x909090) fontSize:11];
    [_textLB sizeToFit];
    [self addSubview:_textLB];
    [_textLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.iconImg);
        make.top.equalTo(self.iconImg.mas_bottom).offset(rateHeight(10));
        make.width.mas_lessThanOrEqualTo(@(rateWidth(200)));
    }];
    self.priceLB = [UILabel labelWithText:@"" textColor:UIColorFromRGB(0xf55555) fontSize:10];
    [_priceLB sizeToFit];
    [self addSubview:_priceLB];
    [_priceLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.iconImg);
        make.top.equalTo(self.textLB.mas_bottom).offset(rateHeight(8));
        make.width.mas_lessThanOrEqualTo(@(rateWidth(200)));
    }];
    
}

@end
